using System;
using System.Collections.Generic;
using System.ServiceModel;
using WcfService1.DTO;

namespace WcfService1
{
    // NOTE: You can use the "Rename" command on the "Refactor" PurchaseInvoice to change the interface name "IPurchaseInvoiceServices" in both code and config file together.
    [ServiceContract]
    public interface IPurchaseInvoiceServices
    {
        [OperationContract]
        List<PurchaseInvoiceDTO> GetList(int page, out long recordCount, string sortProperty = null,
                                         string sortType = "ASC");

        [OperationContract]
        bool Save(PurchaseInvoiceDTO PurchaseInvoice);

        [OperationContract]
        bool Delete(PurchaseInvoiceDTO PurchaseInvoice);

        [OperationContract]
        List<PurchaseInvoiceDTO> GetListByCriteria(Dictionary<String, Object> criteria, string expression, int page,
                                                   out long recordCount);

        [OperationContract]
        List<PurchaseInvoiceDTO> GetAllPurchaseInvoice();

        [OperationContract]
        PurchaseInvoiceDTO GetPurchaseInvoice(string kodePurchaseInvoice);

        [OperationContract]
        List<PurchaseInvoiceDTO> GetPurchaseInvoiceList(string kodePurchaseInvoice);

        [OperationContract]
        string GetLastPINo();

        [OperationContract]
        bool DeleteDetail(PurchaseInvoiceDetailDTO purchaseInvoiceDetailDTO);

        [OperationContract]
        void UpdateStatus(PurchaseInvoiceDTO purchaseInvoiceDto, Status status);

        [OperationContract]
        IEnumerable<PurchaseInvoiceDTO> GetPurchaseInvoiceBySupplier(SupplierDTO supplier);

        [OperationContract]
        void Posting(IEnumerable<PurchaseInvoiceDTO> purchaseInvoiceDtos);

        [OperationContract]
        void UnPosting(IEnumerable<PurchaseInvoiceDTO> purchaseInvoiceDtos);

        [OperationContract]
        IEnumerable<PurchaseInvoiceDTO> GetListByPeriode(DateTime tglstart, DateTime tglend);
    }
}